import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: "/",
            redirect: "/index",
        },
        {
            path: "/",
            component: (resolve) =>
                require(["../components/common/Home.vue"], resolve),
            meta: {title: "自述文件"},
            children: [
                {
                    path: "/index",
                    component: (resolve) =>
                        require(["../components/page/index.vue"], resolve),
                    meta: {title: "系统首页"},
                },
                {
                    path: "/operation",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/operation.vue"], resolve),
                    meta: {title: "操作人员"},
                },
                {
                    path: "/banner",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/banner.vue"], resolve),
                    meta: {title: "轮播图管理"},
                },
                {
                    path: "/goods",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/goods.vue"], resolve),
                    meta: {title: "商品管理"},
                },
                {
                    path: "/goods_order",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/goods_order.vue"], resolve),
                    meta: {title: "商品订单"},
                },
                {
                    path: "/course",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/course.vue"], resolve),
                    meta: {title: "课程管理"},
                },
                {
                    path: "/course_tag",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/course_tag.vue"], resolve),
                    meta: {title: "课程标签管理"},
                },
                {
                    path: "/user_course",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/user_course.vue"], resolve),
                    meta: {title: "报名管理"},
                },
                {
                    path: "/refund",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/refund.vue"], resolve),
                    meta: {title: "退款管理"},
                },
                {
                    path: "/info",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/user_course_info.vue"], resolve),
                    meta: {title: "预约详情"},
                },
				{
					path: "/course_type",
					component: (resolve) =>
						require(["../components/page/serviceManagement/course_type.vue"], resolve),
					meta: {title: "课程分类管理"},
				},
                {
					path: "/user",
					component: (resolve) =>
						require(["../components/page/serviceManagement/user.vue"], resolve),
					meta: {title: "用户管理"},
				},
                {
					path: "/coach",
					component: (resolve) =>
						require(["../components/page/serviceManagement/coach.vue"], resolve),
					meta: {title: "教练管理"},
				},
                {
                    path: "/article_type",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/article_type.vue"], resolve),
                    meta: {title: "资讯类型"},
                },
                {
                    path: "/article",
                    component: (resolve) =>
                        require(["../components/page/serviceManagement/article"], resolve),
                    meta: {title: "资讯管理"},
                },

                {
                    path: "/roleManagement",
                    component: (resolve) =>
                        require(["../components/page/setting_up/role_management.vue"], resolve),
                    meta: {title: "角色管理"},
                },
                {
                    path: "/menuManagement",
                    component: (resolve) =>
                        require(["../components/page/setting_up/menu_management.vue"], resolve),
                    meta: {title: "菜单管理"},
                },
                {
                    path: "/permissionList",
                    component: (resolve) =>
                        require(["../components/page/setting_up/permission_list.vue"], resolve),
                    meta: {title: "接口列表"},
                },
                {
                    path: "/permissionGroup",
                    component: (resolve) =>
                        require(["../components/page/setting_up/permission_group.vue"], resolve),
                    meta: {title: "接口分组"},
                },
                // 日志
                {
                    path: "/operationLog",
                    component: (resolve) =>
                        require(["../components/page/setting_up/operation_log.vue"], resolve),
                    meta: {title: "操作日志"},
                },
                {
                    path: "/systemLog",
                    component: (resolve) =>
                        require(["../components/page/setting_up/system_log.vue"], resolve),
                    meta: {title: "系统日志"},
                },
                {
                    path: "/config",
                    component: (resolve) =>
                        require(["../components/page/setting_up/config.vue"], resolve),
                    meta: {title: "系统参数设置"},
                },
                {
                    path: "/store",
                    component: (resolve) =>
                        require(["../components/page/setting_up/store.vue"], resolve),
                    meta: {title: "门店管理"},
                },
                {
                    path: "/district",
                    component: (resolve) =>
                        require(["../components/page/setting_up/district.vue"], resolve),
                    meta: {title: "小区管理"},
                },
                {
                    path: "/financial_statement",
                    component: (resolve) =>
                        require(["../components/page/setting_up/financial_statement.vue"], resolve),
                    meta: {title: "财务报表"},
                },
                {
                    path: "/rule",
                    component: (resolve) =>
                        require(["../components/page/setting_up/rule.vue"], resolve),
                    meta: {title: "规则协议设置"},
                },
                {
                    path: "/editor",
                    component: (resolve) =>
                        require(["../components/page/setting_up/editor.vue"], resolve),
                    meta: {title: "编辑器"},
                },

            ],
        },
        {
            path: "/login",
            component: (resolve) =>
                require(["../components/page/Login.vue"], resolve),
        },
    ],
});
